package com.mycompany.myapp2;
import android.app.*;
import android.graphics.drawable.*;
import android.os.*;
import android.view.*;
public class MainActivity extends Activity 
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        //沉浸状态栏
		if (Build.VERSION.SDK_INT>=19){
			//修改标题栏颜色
			ActionBar ab=getActionBar();ab.setBackgroundDrawable(new ColorDrawable(0x1C58EF));

			Window window = getWindow();     
			window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,                      WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
	    }	 

        setContentView(R.layout.main);
    }
}
